package com.dlink.sqljobsync.propertie;

import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.Map;

/**
 * 参考Dlinky配置，进行JSON属性定义
 * @author ASUS
 */
@Getter
@Setter
public class JobConfig implements java.io.Serializable{

    // flink run mode
    private String type;
    //flink run 运行地址
    private String address;
    //脚本执行的Sql
    private String statement;
    //是否显示运行结果
    private boolean useResult = true;
    private boolean useStatementSet = false;
    private boolean useChangeLog = false;
    private boolean useAutoCancel = false;
    private boolean fragment = false;
    private Integer maxRowNum = 100;
    private Integer checkPoint = 0;
    private Integer parallelism = 1;
    private String jobName;
    private String savePointPath = "hdfs://ns/flink/savepoints/savepoint";
    private Map<String, Integer> configurationString = new HashMap<String, Integer>(){
        {
            put("table.exec.resource.default-parallelism", 2);
        }
    };

    public JobConfig() {
    }
}
